import { createApp } from 'vue'
import { createPinia } from 'pinia'
import oneui from 'oneui/install'

import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/main.css'
import GlobalInput from './components/GlobalInput.vue'

const app = createApp(App)

app.use(createPinia())
app.use(router)
app.use(oneui)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus)
// 注册全局组件，提供给oneui中使用
app.component(GlobalInput.name, GlobalInput)

app.mount('#app')
